//
//  StreetWorkGuideService.m
//  homeland
//
//  Created by Alawn on 13-10-21.
//  Copyright (c) 2013年 xzysun. All rights reserved.
//

#import "StreetWorkGuideService.h"
#import "StreetWorkGuideEntity.h"
#import "WorkQueryCell.h"
@implementation StreetWorkGuideService
-(id)init
{
    self = [super init];
    if (self) {
        _dataItemName = @"StreetWorkGuideEntity";
    }
    return self;
}
-(void)loadDataWithKey:(NSString *)keyOrNil
{
    _currentPageNo = 1;//刷新或查询的时候将请求页码变为1
    if (self.dataList) {
        self.dataList = nil;
    }
    NSMutableDictionary *params = [NSMutableDictionary dictionary];
//     StreetWorkEntity *item = (StreetWorkEntity *)self.dataItem;
//    [params setValue:item.name forKey:@"serviceName"];
    if (keyOrNil) {
        [params setValue:keyOrNil forKey:@"serviceName"];
    } else {
        [params setValue:@"" forKey:@"serviceName"];
    }
    [params setValue:@"440105QCJRLHH" forKey:@"adminOrgCode"];
    [self doHttpPost:SERVER_URL_PEOPLE_ITEM_LIST headers:nil path:[NSString stringWithFormat:@"/%d",_currentPageNo] parameters:params];
}

-(void)loadMoreDataWithKey:(NSString *)keyOrNil
{
    NSMutableDictionary *params = [NSMutableDictionary dictionary];
//    StreetWorkEntity *item = (StreetWorkEntity *)self.dataItem;
    if (keyOrNil) {
        [params setValue:keyOrNil forKey:@"serviceName"];
    } else {
        [params setValue:@"" forKey:@"serviceName"];
    }
    [params setValue:@"440105QCJRLHH" forKey:@"adminOrgCode"];
    [self doHttpPost:SERVER_URL_PEOPLE_ITEM_LIST headers:nil path:[NSString stringWithFormat:@"/%d",_currentPageNo] parameters:params];
}

-(void)configCell:(UITableViewCell *)cell atIndex:(NSIndexPath *)index
{
//    StreetWorkGuideEntity *item = [self.dataList objectAtIndex:index.row];
//    WorkQueryCell *tempCell = (WorkQueryCell *)cell;
//    tempCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
//    tempCell.textLabel.text = item.name;
//    [self configInfoWithGuidCell:tempCell withItem:item atIndex:index.row];
}

-(CGFloat)heightForCellAtRow:(NSIndexPath *)index
{
    return 64.0f;
}

//-(NSDictionary *)getTargetConfigForCellAtIndex:(NSIndexPath *)indexPath
//{
//    StreetWorkGuideEntity *item = [self.dataList objectAtIndex:indexPath.row];
//    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:@"查看办事指南",@"key",item,@"dataItem", nil];
//    return dic;
//}
@end
